# from datasets import load_dataset
#
# data = load_dataset(path="csv",data_files="data/Weibo_new/train.csv",split="train")
# print(data)
#
# for i in data:
#     print(data["text"])

import pandas as pd

df = pd.read_csv("data/Weibo_new/train.csv")

# 统计每个类别的数据量
category_counts = df['label'].value_counts()

# 统计每个类比的比值
total_date = len(df)
category_ratios = (category_counts / total_date) * 100

print(category_counts)
print(category_ratios)